home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 033a / prevnt31.zip / PREVENT.DOC next >
Text File  |  1990-10-13  |  8KB  |  176 lines

  1. PREvent 3.10
  2. PCBoard Rotary Event Manager
  3. Release 10-13-90
  4. by Jeff Woods
  5.  
  6.  
  7. Ok, time for a complete rewrite of these docs.    The update sequence is
  8. getting confusing.
  9.  
  10. With the release of PCBoard 14.5, I found my multiple event program
  11. trashed, and my need for multiple events still existing.    It was a
  12. two hour job to write this, so I hereby dedicate PREvent to the
  13. public domain.   If your conscience bothers you so much that you can't
  14. use a program without paying for it, give Telix a plug to a friend.
  15.  
  16. PREvent is very simple and straightforward.   It uses a data file to
  17. read in a list of your event times in chronological order, and matches
  18. them against PCBoard.DAT to determine the next time.
  19.  
  20. This file, PREVENT.LST is simple.   The first line is the number of
  21. events you wish to run, and the remaining lines are those of the event
  22. times and other event information, as well as day of the week
  23. information.   For example, I have three events, one at just before midnight,
  24. one at 2:30 am, and one at 4:00 am.   My PREVENT.LST file looks like
  25. this (and is the same as the one included here):
  26.  
  27. 4                     <-  First line MUST be the total number of events
  28. 012356                <-  Days of the week for event # 1
  29. 02:30,y,2,n,10        <-  Event information for event # 1
  30. a                     <-  Days of the week for event # 2
  31. 04:30,y,20,y,3        <-  Event information for event # 2
  32. 123564                <-  Days of the week for event # 3
  33. 12:00,n,2,n,100
  34. 012356                    etc......
  35. 23:57,y
  36.  
  37. The comments to the right must NOT be present when Prevent is run, or
  38. you will encounter RUNTIME error 106 when run.   They are just for your
  39. information within these docs.
  40.  
  41.  
  42. Days of the week are as follows, and may appear on the line in any
  43. order.    PREvent does not care.   01234 is the same as 40231.
  44.  
  45.                 0 - Sunday        4 - Thursday
  46.                 1 - Monday        5 - Friday
  47.                 2 - Tuesday       6 - Saturday
  48.                 3 - Wednesday     A - Every day
  49.  
  50. Note that an "A" ANYWHERE on the days line for an event will override
  51. any other information.    Thus 01A2 will still run Wednesday through
  52. Saturday even though 3456 is not on the command line.
  53.  
  54. The other optional format for the first line for an event is new to
  55. version 3.0.   It allows events to run only on specific days of the
  56. MONTH, or in a given month only.   Substituting this line for a valid
  57. days of the month line will allow this, if the following format for
  58. month-specific events is followed:
  59.  
  60. Dmm/dd
  61.  
  62. Where mm is the month, and dd is the day.   Both MM and DD MUST have two
  63. digits, so use D01/01 for January first, etc.   You may substitute the
  64. letter "A" for mm, and it will run on the dd'th day of EVERY month.  An
  65. example line for that might be for events that compress and clean up
  66. caller logs on the first of each month:
  67.  
  68. DA/01
  69.  
  70. The slash is significant, and must separate mm and dd.
  71.  
  72. Here are a few examples of events that will run on given days of the
  73. MONTH:
  74.  
  75. D05/15  (will run ONLY on may 15th)
  76. DA/10   (will run on the tenth of EVERY month)
  77. DA/31   (will run on the LAST day of every month with 31 days)
  78. D02/29  (will run once every four years, on leap year)
  79.  
  80. Yes, Prevent is smart enough to make a few assumptions now.   It knows
  81. how many days are in each month and adjusts for leap years as well.   It
  82. also will adjust automatically to operate flawlessly, determining which
  83. event is next (there was a minor bug in the day of the week specific
  84. routines in 2.5 - fixed).
  85.  
  86. The second line for each event is the event specific information about
  87. sliding, acticity suspension, and upload suspension.    The format of
  88. these lines is as follows:
  89.  
  90.   ┌────────────────────────  Hour and minute of Next Event    e.g. 02:00');
  91.   │   ┌────────────────────  Slide This Event?  ( Y,N )
  92.   │   │ ┌──────────────────  Minutes prior to event to suspend? ( 0 - 99 )
  93.   │   │ │ ┌────────────────  Disallow uploads prior to event?   ( Y,N )
  94.   │   │ │ │ ┌──────────────  Minutes prior to stop allowing uploads? ( 0 - 99 )
  95.   │   │ │ │ │
  96.         
  97.  
  98. hh:mm,N,5,Y,10
  99.  
  100. The first parameter, the hh:mm, is the only required parameter, and MUST
  101. contain five characters.  All others are optional, but must be in that order.
  102. If you want to disallow uploads 10 minutes before, you MUST also specify a
  103. sliding and minutes to suspend value.   If you do not supply a sliding time,
  104. no others will take effect, and so on down the chain.
  105.  
  106. Thus:
  107.  
  108. 02:00,N,10   sets the next event at 2 am with no sliding, and suspends
  109.              activity 10 minutes prior.
  110.  
  111. 15:00,Y,0,Y,30  will set an event for 3 pm, slide it, but will stop all
  112.                 uploads 30 minutes before three.
  113.  
  114. 23:00        simply sets the next event to 11 pm, leaving all other
  115.              params as they were.
  116.  
  117.  
  118. Note that order is important.   The order MUST be chronological,
  119. starting with 02:30 (the earliest possible event time) and ending with
  120. the latest, 23:57.   All times must be in military format.   The .LST
  121. file may contain up to 48 differenct event times.   Place this file in
  122. your PCBoard system directory, the same one where PCBoard.DAT resides.
  123. This is usually something like D:\PCB.
  124.  
  125. Place PREVENT.EXE in your PCBoard system directory also.   No parameters
  126. are required to run PREvent.   Just include the command:
  127.  
  128. PREVENT [datafile]
  129.  
  130. in your EVENT.SYS and off it goes.
  131.  
  132. The default datafile name is PREVENT.LST in the current directory.
  133.  
  134. PREvent returns an error level based on the event it runs.  In the above
  135. example, if the CURRENT event running is the 02:30 event, no matter WHAT
  136. the next event is (it can be different depending on what days it is set
  137. to run) it will return an errorlevel of 1.    Note that this differs
  138. from versions prior to 2.3 in that older versions based the error level
  139. on the next event, which is no longer possible with the addition of day
  140. specific events.     You can use these errorlevels in your EVENT.SYS
  141. file to take the appropriate action.   Thus, if errorlevel 1 is
  142. returned, you know that the 2:30 event is running and can call the
  143. according batch file.   I hope that's not too confusing.
  144.  
  145. As an example, using the above config file, your EVENT.SYS file might
  146. look like this:
  147.  
  148. PREVENT PREVENT.LST
  149. if errorlevel 4 event4.bat      <- this would run at the 2:30 event
  150. if errorlevel 3 event3.bat      <- this would run at the 4:30 event
  151. if errorlevel 2 event2.bat      <- this would run at the 12:00 event
  152. if errorlevel 1 event1.bat      <- this would run at the 23:57 event
  153. if errorlevel 0 board.bat
  154.  
  155. Errorlevels MUST be checked in reverse order, since "if errorlevel 1" is
  156. actually "if errorlevel >= 1".
  157.  
  158.  
  159. PREvent works ONLY on PCBoard 14.0+.   Any attempt to use it on earlier
  160. version are not warranted.   It should not change anything in such a
  161. case and will return an error level of zero, but no guarantees.
  162.  
  163. And now for the legal, boring stuff.   I left it until the end, so if
  164. you don't care to read this, oh, well.   It was here.
  165.  
  166. Jeff Woods nor the Musical Chair warrants any part of this program.   It
  167. is provided free, and as such, any damages it may cause to files,
  168. hardware, or incidental damages such as lost time or wages, are not my
  169. responsibility.   Or, in short, I cannot be held responsible for any
  170. damages resulting from the use (or mis-use) of this program.
  171.  
  172. As with all software, you should backup your PCBoard.DAT file before
  173. trying this the first time.   The latest version is always available for
  174. downloading from the Musical Chair at 416-438-3009, running an HST Dual
  175. Standard.
  176.